import React from 'react';
import {
    RouterView
} from '@/router'
import { Provider } from '@/context'

class Home extends React.Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

    render() {
        return (<>
            <h3>我是Home</h3>
            <Provider value={{background: 'green', color: 'white'}}>
                {this.props.routes.map((route, i) => (
                    <RouterView key={i} {...route}/>
                ))}
            </Provider>
        </>)
    }
}

export default Home
